<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>


    <script>
        function People()
        {
            this.name='biden';
            this.age=78;
            this.run=function()
            {

            }
        }

        function Driver()
        {
            this.name='benchi'
            //在调用父类构造函数的时候，把父类的this指向 指向当前的this  当前的this指向的是Driver
            People.call(this)
            this.drive=function()
            {

            }
        }
        var d1=new Driver()
        console.log(d1.name);
        
    </script>
    
</body>
</html>